ia.GradientLegend Class
A class for rendering a gradient legend.
Constructor
ia.GradientLegend
-
id
Parameters:
-
id
StringThe id of the the legend.
Item Index
Methods
Properties
Methods
_build
-
cw
-
ch
Builds the legend.
Parameters:
-
cw
NumberThe width.
-
ch
NumberThe height.
_highlightBlock
-
value
Highlights the block legend
Parameters:
-
value
NumberThe value of the item.
_highlightPoint
-
value
Highlights the point legend.
Parameters:
-
value
NumberThe value of the item.
_renderBlock
()
private
Renders the block legend.
_renderPoint
()
private
Renders the point legend.
addEventListener
-
eventType
-
fnc
-
obj
Add an event listener.
Parameters:
-
eventType
StringThe type of event to listen for.
-
fnc
FunctionThe function to call when the event occurs.
-
obj
ObjectAn optional parent object.
clearHighlight
()
Clears all highlights.
clearSelection
()
Clears all selections.
dispatchEvent
-
event
Dispatch an event to the listeners.
Parameters:
-
event
ObjectThe event object.
hide
()
Hides the legend.
highlight
-
id
Highlights the legend.
Parameters:
-
id
StringThe id of the item.
removeListener
-
obj
Removes all event listeners for the given object.
Parameters:
-
obj
ObjectThe object.
render
()
Renders the legend.
select
-
id
Selects.
Parameters:
-
id
StringThe id of the item.
show
()
Shows the legend.
unselect
-
id
Unselects.
Parameters:
-
id
StringThe id of the item.
Properties
container
JQUERY Element
The container that holds the object.
highlightColor
String
The item highlight color.
id
String
The id.
style
Object
The style.
Default: {fillStyle:'#EFEFEF', strokeStyle:'#cccccc', lineWidth:'0.5', lineJoin:'miter'}